nav.navbar(role="navigation", ng-controller="NavbarCtrl")
  .alert.alert-warning(l10n, style="margin-bottom: 0;", ng-show="debug")
    | You are viewing an account in&#32;
    a(href="#/debug", class="text-warning", style="text-decoration: underline") Debug
    | &#32;mode. While in this mode, you can view publicly available data, but you cannot initiate any transactions. Click&#32;
    a(href="", ng-click="page_reload()", class="text-warning", style="text-decoration: underline") here
    | &#32;to exit.
  .alert.alert-warning(l10n, style="margin-bottom: 0;", ng-show="accountLinesWarning")
    | Warning: this account has over 200 trust lines, so the displayed account balance may not be accurate.
  .mainnav
    .container
      .navbar-header
        .navbar-toggle.snapper-toggle
          a(href="").fa.fa-bars
        a.logo.hidden-xs(href="#/", title="Ripple")
      .collapse.navbar-collapse
        ul.nav.navbar-nav.topMenu
          li#nav-wallet(ng-class="{active: $route.current.mainMenu == 'wallet'}")
            a(href="#/balance", l10n) Overview
          li#nav-send(ng-class="{active: $route.current.mainMenu == 'send'}")
            a(href="#/send", l10n) Send
          li#nav-exchange(ng-class="{active: $route.current.mainMenu == 'exchange' || $route.current.mainMenu == 'trade'}", ng-show="!ripple_exchange_selection_trade")
            a(href="#/exchange", l10n) Trade
          li#nav-exchange(ng-class="{active: $route.current.mainMenu == 'exchange' || $route.current.mainMenu == 'trade'}", ng-show="ripple_exchange_selection_trade")
            a(href="#/trade", l10n) Trade
          li#nav-fund(ng-class="{active: $route.current.mainMenu == 'fund'}")
            a(href="#/xrp", l10n) Gateways
          //- li#nav-fund(ng-class="{active: $route.current.mainMenu == 'pretend'}")
          //-   a(href="#/pretend", l10n) Pretend
        ul.nav.navbar-nav.navbar-right
          //- li.dropdown.balances-dropdown
          //-   p.navbar-text(ng-show="!loadState.account", l10n) Loading your balance...
          //-   a.dropdown-toggle(ng-show="loadState.account")
          //-     span.balance.primary(ng-show="!account.Account", l10n) Unfunded account
          //-     span.balance.primary(ng-show="account.Account")
          //-       span.amount {{account.Balance | rpamount:{precision: 2} }}
          //-       span.balance.currency  XRP&nbsp;
          //-         span.fa.fa-chevron-down
          //-   ul#balances.dropdown-menu
          //-     li.balance(ng-repeat="balance in balances")
          //-       span.balance {{balance.total | rpamount:{rel_precision: 2} }}&nbsp;
          //-       span.balance(rp-currency="balance.total", rp-currency-short)
          li
            a.btn.btn-submit.btn-block.btn-success#migrateBtn(type="submit", ng-click="migrate()")
              span(l10n) Migrate Wallet to Gatehub
          li
            span(class="serverStatus {{connected ? 'online' : 'offline'}} {{serverLoad}}"
                ng-switch='serverStatus')
              span(ng-switch-when='disconnected'
                  rp-popover, rp-popover-placement='bottom', rp-popover-trigger='hover', rp-popover-delay
                  l10n-rp-popover-content="Disconnected from the Ripple network")
              span(ng-switch-when='highLoad'
                  rp-popover, rp-popover-placement='bottom', rp-popover-trigger='hover', rp-popover-delay
                  l10n-rp-popover-content="Network fees are currently higher than your maximum. Fee: {{ fee | rpamount }} XRP. <a href='#/advanced'>Change fees</a>")
              span(ng-switch-when='mediumLoad'
                  rp-popover, rp-popover-placement='bottom', rp-popover-trigger='hover', rp-popover-delay
                  l10n-rp-popover-content="Network fees are currently higher than normal. Fee: {{ fee | rpamount }} XRP")
              span(ng-switch-when='lowLoad'
                  rp-popover, rp-popover-placement='bottom', rp-popover-trigger='hover', rp-popover-delay
                  l10n-rp-popover-content="Connected to the Ripple network. Fee: {{ fee | rpamount }} XRP")
              span(ng-switch-when='connected'
                  rp-popover, rp-popover-placement="bottom", rp-popover-trigger="hover", rp-popover-delay
                  l10n-rp-popover-content="Connected to the Ripple network.")
          li
            a(href="#/account/public", ng-hide="loading") ~{{userCredentials.username}}
          li.dropdown.notifications-dropdown(dropdown on-toggle="toggled(open)")
            a.dropdown-toggle(ng-click="read()", href dropdown-toggle)
              i.fa.fa-bell
              span.number(ng-show="unseenNotifications.count") {{unseenNotifications.count}}
            ul#notifications.dropdown-menu
              li.message(ng-hide="loadState.transactions", l10n) Loading...
              li.message(ng-show="loadState.transactions && !notifications.length", l10n) There are no recent notifications.
              li.notification(
                ng-repeat="entry in notifications"
                ng-class="{unseen: entry.unseen}"
                rp-link-tx="entry.hash"
                ng-show="notifications.length"
                )
                .desc(ng-switch="entry.transaction.type")
                  .transaction(ng-switch-when="sent")
                    span(l10n) You sent
                      strong.nowrap  {{entry.transaction.amount | rpamount}} {{entry.transaction.amount | rpcurrency}}
                      |  to
                      span.address(title="{{entry.transaction.counterparty}}")  {{entry.transaction.counterparty | rpcontactnamefull | rpripplename: {tilde: true} }}
                    include ../tabs/history/effects.jade
                  .transaction(ng-switch-when="received")
                    span.address(title="{{entry.transaction.counterparty}}", l10n)
                      span {{entry.transaction.counterparty | rpcontactnamefull | rpripplename: {tilde: true} }}
                      |  sent you
                      strong.nowrap  {{entry.transaction.amount | rpamount:{reference_date:entry.dateRaw} }} {{entry.transaction.amount | rpcurrency}}
                    include ../tabs/history/effects.jade
                  .transaction(ng-switch-when="exchange")
                    include ../tabs/history/effects.jade
                  .transaction(ng-switch-when="trusted")
                    span.address(title="{{entry.transaction.counterparty}}", l10n)
                      | {{entry.transaction.counterparty | rpcontactname}} now trusts you for
                    strong.nowrap  {{entry.transaction.amount | rpamount}}
                      | {{entry.transaction.amount | rpcurrency}}
                    include ../tabs/history/effects.jade
                  .transaction(ng-switch-when="trusting")
                    span(l10n) You have now connected to the gateway&#32;
                      span.address(title="{{entry.transaction.counterparty}}")
                        | {{entry.transaction.counterparty | rpcontactname}}
                      span(l10n-inc) &#32;for&#32;
                      strong.nowrap {{entry.transaction.amount | rpamount:{reference_date:entry.dateRaw} }}
                        | {{entry.transaction.amount | rpcurrency}}
                      | .
                    include ../tabs/history/effects.jade
                  .transaction(ng-switch-when="offernew")
                    include ../tabs/history/effects.jade
                  .transaction(ng-switch-when="offercancel")
                    span(l10n) You cancelled an order accepting&#32;
                      strong.nowrap {{entry.transaction.pays | rpamount}}
                        | {{entry.transaction.pays | rpcurrency}}
                      |  for&#32;
                      strong.nowrap {{entry.transaction.gets | rpamount}}
                        | {{entry.transaction.gets | rpcurrency}}
                    include ../tabs/history/effects.jade
                  .transaction(ng-switch-when="accountset", l10n)
                    | Account details have been changed
                  .transaction(ng-switch-when="rippling")
                    span(l10n) Rippling
                    include ../tabs/history/effects.jade
                  .transaction(ng-switch-when="failed", l10n)
                    | Failed transaction
                  .transaction(ng-switch-default)
                    include ../tabs/history/effects.jade
                .date {{entry.date | rpfromnow}}
              li.history(ng-show="notifications.length")
                a(href="#/history", l10n) View Full History
          li.settings(dropdown on-toggle="toggled(open)")
            a.dropdown-toggle.fa.fa-cog(href dropdown-toggle)
            ul.dropdown-menu
              li: a(href="#/account/public", l10n)
                |  Account
              li: a(href="#/security", l10n)
                |  Settings
              li: a.logout(ng-click='logout()', l10n)
                |  Log Out
  .subnav(ng-show="$route.current.mainMenu == 'wallet'")
    .container
      ul
        li(ng-class="{active: $route.current.tabName == 'balance'}")
          a(href="#/balance", l10n) Balance
        li(ng-class="{active: $route.current.tabName == 'history'}")
          a(href="#/history", l10n) History
        li(ng-class="{active: $route.current.tabName == 'contacts'}")
          a(href="#/contacts", l10n) Contacts
  .subnav(ng-show="$route.current.mainMenu == 'exchange' || $route.current.mainMenu == 'trade'")
    .container
      ul
        li(ng-class="{active: $route.current.tabName == 'exchange'}")
          a(href="#/exchange", l10n) Simple
        li(ng-class="{active: $route.current.tabName == 'trade'}")
          a(href="#/trade", l10n) Advanced
  .subnav(ng-show="$route.current.mainMenu == 'fund'")
    .container
      ul
        li(ng-class="{active: $route.current.tabName == 'xrp'}")
          a(href="#/xrp", l10n) Featured gateways
        li(ng-class="{active: $route.current.tabName == 'trust'}")
          a(href="#/trust", l10n) Add any gateway (trust lines)
